package com.wydpp.xml;

public class xml {
    public static String setInviteEnd(String channelId,String addressStr,
    String deviceName,int sendPort,String ssrc){
        return "v=0\n" +
                "o="+channelId+" 0 0 IN IP4 "+addressStr+"\n" +
                "s="+deviceName+"\n" +
                "c=IN IP4 "+addressStr+"\n" +
                "t=0 0\n" +
                "m=video "+sendPort+" RTP/AVP 96\n" +
                "a=sendonly\n" +
                "a=rtpmap:96 PS/90000\n" +
                "y="+ ssrc +"\n" +
                "f=";
    }

    public static String setDeviceInfo(String sn,String deviceId,
                                       String deviceName,String manufacturer){
         return "<?xml version=\"1.0\"?>\n" +
                "<Response>\n" +
                "    <CmdType>DeviceInfo</CmdType>\n" +
                "    <SN>"+sn+"</SN>\n" +
                "    <DeviceName>"+deviceName+"</DeviceName>\n" +
                "    <DeviceID>"+deviceId+"</DeviceID>\n" +
                "    <Result>OK</Result>\n" +
                "    <Manufacturer>"+manufacturer+"</Manufacturer>\n" +
                "    <Model>TC-2808AN-HD</Model>\n" +
                "    <Firmware>V2.1,build091111</Firmware>\n" +
                "</Response>";
    }

    public static String setCatalogTop(String sn,String deviceId,String sumNum,String num){
        return "<?xml version=\"1.0\"?>\n" +
                "<Response>\n" +
                "    <CmdType>Catalog</CmdType>\n" +
                "    <SN>"+sn+"</SN>\n" +
                "    <DeviceID>"+deviceId+"</DeviceID>\n" +
                "    <SumNum>"+sumNum+"</SumNum>\n"+
                "      <DeviceList Num=\""+num+"\">\n";
    }

    public static String setDeviceList(
            String parentDeviceId,String deviceId,
            String vechecileNo, String manufacturer,
            String status,int isExitChildDevice){
        return  "        <Item>\n" +
                "            <DeviceID>"+deviceId+"</DeviceID>\n" +
                "            <Name>"+vechecileNo+"</Name>\n" +
                "            <Manufacturer>"+manufacturer+"</Manufacturer>\n" +
                "            <CivilCode>CivilCode</CivilCode>\n" +
                "            <Parental>"+isExitChildDevice+"</Parental>\n" +
                "            <ParentID>"+parentDeviceId+"</ParentID>\n" +
                "            <Status>"+status+"</Status>\n" +
                "        </Item>\n" ;

    }

    public static String setRecordInfoTop(String sn,String deviceId,
                                          String cameraName,int sumNum){
        return "<Response>\n" +
                "    <CmdType>RecordInfo</CmdType>\n" +
                "    <SN>"+sn+"</SN>\n" +
                "    <DeviceID>"+deviceId+"</DeviceID>\n" +
                "    <Name>"+cameraName+"</Name>\n" +
                "    <SumNum>"+sumNum+"</SumNum>\n" +
                "    <RecordList>\n";
    }

    public static String setRecordList(String deviceId,String cameraName,
                                          String recorderID, String startTime,String endTime){
        return  "        <Item>\n" +
                "            <DeviceID>"+deviceId+"</DeviceID>\n" +
                "            <Name>"+cameraName+"</Name>\n" +
                "            <FilePath>"+recorderID+"</FilePath>\n" +
                "            <Address>cameraName</Address>\n" +
                "            <StartTime>"+startTime+"</StartTime>\n" +
                "            <EndTime>"+endTime+"</EndTime>\n" +
                "            <Secrecy>0</Secrecy>\n" +
                "            <Type>time</Type>\n" +
                "            <RecorderID>"+recorderID+"</RecorderID>\n" +
                "        </Item>\n";
    }

}
